package StudyCode.summary.tempfile;

import java.io.File;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CreateTempFileInDirectory {
	public static void main(String[] args) {
		File file = null;
		File dir = new File("E:/Copy");
		try {
			file = File.createTempFile("JavaTemp", ".javatemp", dir);
		} catch (IOException ioe) {
			ioe.printStackTrace();
		}
		System.out.println("临时文件创建成功: " + file.getPath());
	}
}
